// float mean. 
#include <stdio.h>

float mean1(float *p, int n)
{
    float ret = 0.0, sum1 = 0.0;
    int i;
    for(i = 0; i < n; i++)
    {
        sum1 += *(p + i);
    }
    ret = sum1 / n;
    return ret;
}

int main(void)
{
    float nums[3] = {15.0, 15.0, 15.0};
    float result;
    result = mean1(nums, 3);

    printf("mean is : %.2f\n", result);
    return 0;
}